<?php
$main = getJson();
echo $main;
?>
<?php
function getJson()	{
	include_once("../inc/checkArg.php");
	$mark = checkArg("mark",False);
	$mod = checkArg("mod","twoball");
	$sJson=csv2jsonMatrix($mark,$mod);
	return $sJson;
}
?>
<?php
function csv2jsonMatrix($mark,$mod)	{
	$sMod	=	$mod;
	include_once("../inc/file2history.php");
	$aHistory	=	file2history("../history/".$sMod.".csv");
	include_once("../inc/lotteryMod.php");
	$aMod		=	lotteryMod("../lotteryMod/".$sMod.".csv");
	include_once("../inc/history2jsonMatrix.php");
	$aMatrix	=	history2jsonMatrix($aHistory,$aMod,$mark);
	$sJson	=	json_encode($aMatrix);
	return $sJson;
}
?>